package com.milo.coding.syncronized;

import org.openjdk.jol.info.ClassLayout;

import java.util.concurrent.TimeUnit;


public class T0_ObjectSize {

    public static void main(String[] args) throws InterruptedException {
        TimeUnit.SECONDS.sleep(5); // JVM会延迟启动偏向锁 大概4秒
        Object o = new Object();
        System.out.println(ClassLayout.parseInstance(o).toPrintable());
        synchronized (o){
            System.out.println(ClassLayout.parseInstance(o).toPrintable());
        }
    }
}
